/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cliente;

import aso.upna.exceptions.MediaPlayerNotReady;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author triki
 */
public class ReproductorThread implements Runnable{

    private Reproductor rep;

    public ReproductorThread(Reproductor reproductor)
    {
        rep = reproductor;
    }

    public void run()
    {
        try {
            rep.play();
        } catch (MediaPlayerNotReady ex) {
           ex.printStackTrace();
        }
        finally
        {
            try {
                System.out.println("Termiando el hilo..");
                this.finalize();
            } catch (Throwable ex) {
               ex.printStackTrace();
            }
        }
    }
}
